#include<iostream>
using namespace std;
void my_Swap(int& x,int& y)
{
    int tmp=x;
    x=y;
    y=tmp;
}
int main()
{
    int time,num1,num2,num3;
    int& a=num1;
    int& b=num2;
    int& c=num3;
    cin>>time;
    while(time--)
    {
        cin>>num1>>num2>>num3;
        if(a<b)
        {
            my_Swap(a,b);
        }
        if(a<c)
            my_Swap(a,c);
        if(b<c)
            my_Swap(b,c);
        cout<<a<<" "<<b<<" "<<c<<endl;
    }
}